1. Field of the Invention
The present invention relates to a drawing technology for generating raster format graphic data from vector format graphic data.
2. Description of the Background Art
Images configured by combining geometric graphics primitives such as points, straight lines, curves, rectangles, and ellipses are called vector graphics. On the other hand, images configured by arrays of points (pixels or dots) are called raster graphics.
Generally, images which are displayed on displays or are printed by printers are raster graphics. Therefore, when vector graphics are handled by these devices, processing for transforming those into raster graphics (i.e., rasterizing) is required. The processing cost of rasterizing is high, and a high-performance computer is required for rasterizing complicated vector graphics.
On the other hand, because proper-resolution raster graphics can be generated every time vector graphics are displayed, there is no case in which the image qualities of contours and the like are deteriorated due to enlargement, reduction, and deformation of images. For this reason, artificial images such as illustrations and drawings, whose contours are clear, are handled as vector graphics in many cases. Natural images such as photographs are handled as raster graphics in many cases.
As the most familiar example of the utility of vector graphics, fonts have been known. In early personal computers (hereinafter referred to as “PC”), raster format fonts (bitmap fonts) have been used due to the restrictions on the CPU performances. However, in bitmap fonts, it is necessary to store font data at each resolution, and thus, a large quantity of storage capacity is required.
In accordance with improvement in subsequent CPU performances, current PCs can display high-quality fonts with a less storage capacity in such a manner that vector format font (outline font) data independent of resolution are stored in advance, and fonts at appropriate resolution corresponding to a display or a printer are generated in each case.
However, CPUs built into mobile telephones, car navigation systems, or the like have relatively low processing capacities. Hence, there has been an object that arithmetic costs required for rasterizing vector graphics are reduced.
In recent years, graphics processing units (GPUs) have been used in order to achieve the above object. In a rasterizing technique using the GPU, a curve is approximated by using a plurality of triangles. For this reason, when raster graphics are enlarged, the raster graphics have the rough looks. Because it is necessary to improve the approximate accuracy of a curve by using a large number of triangles in order to smoothly rasterize vector graphics, the increases in the storage capacity and the processing cost are inevitable. Here, a technique for rasterizing vector graphics by using, for example, a GPU has been proposed (Reference Document: C. Loop and J. Blinn, Resolution Independent Curve Rendering using Programmable Graphics Hardware, refer to SIGGRAPH 2005). The processing of the rasterizing technique in the reference document includes two-staged processing of preprocessing by a CPU, and main processing by the GPU.
In the rasterizing technique in this reference document, vector graphics are processed, not in units of triangles, but in units of pixels near to a curve. As a consequence, the curve can be always smoothly rasterized independently of resolution. In addition thereto, the storage capacity and the processing cost are independent of resolution, and thus, there is no need to increase the storage capacity and the processing cost.
However, there are the following two problems in the rasterizing technique in the above-described reference document.
(1) The cost of preprocessing is high. The cost of preprocessing does not become a critical problem unless a geometrical form of a graphic changes in time. This is because there is no need to execute the preprocessing again after preprocessing is once performed. However, when a geometrical form of a graphic changes dynamically, the preprocessing must be performed again in each case, and therefore, the preprocessing will be a bottleneck in the entire rasterizing processing in many cases.
(2) Alpha blending is used for anti-aliasing. The “anti-aliasing” is processing for removing jaggy (step-like aliasing) appearing on a contour of a rasterized graphic. The “alpha blending” is processing for blending two pixel values translucently by using a coefficient called an alpha value.
As is widely known, in order to use alpha blending, all graphics objects must be sorted by a depth value (depth-sorted), and rasterized in order of graphic at a deeper position. The depth sorting is processing at an extremely high cost, and may be a bottleneck of the entire rasterizing processing in many cases.